package com.dfrz.problem.dao;

import java.util.List;

import com.dfrz.problem.model.Employee;
import com.dfrz.problem.model.Role;

public interface EmployeeDao {
	
	/**
	 * 根据邮箱获取账户信息
	 * @param account
	 * @return
	 */
	public Employee getEmployee(String email);

	/**
	 * 添加新员工
	 * @param employee
	 * @return
	 */
	public boolean addEmployee(Employee employee);
	
	/**
	 * 删除员工信息
	 * 通过用户名邮箱来删除员工信息
	 * @author Wang
	 * @return
	 */
	public boolean deleteEmployee(String email);
	
	/**
	 * 通过用户名邮箱来赋予员工角色信息
	 * @author WANG
	 */
	public boolean giveroleEmployee(String email,Role role);
	
	/**
	 * 修改员工信息
	 * 根据邮箱号修改一个员工信息
	 * @param employee
	 * @return
	 */
	public boolean updateEmployee(Employee employee);

	/**
	 * 验证密码是否正确
	 * @param password
	 * @param email
	 */
	public boolean checkPwd(String password, String email);

	/**
	 * 修改密码
	 * @param email
	 * @param md5Str
	 * @return
	 */
	public boolean updatePwd(String email, String password);

	/**
	 * 根据问题id获取关联的employee
	 * @param problemId
	 * @return
	 */
	public Employee getEmployeeOnProblemId(Integer problemId,Integer roleId);

	/**
	 * 根据项目id获取员工列表
	 * @param projectId
	 * @return
	 */
	public List<Employee> getListEmployee(Integer projectId);

	/**
	 * 获取所有员工信息
	 * @return
	 */
	public List<Employee> getEmployeeAll();

	/**
	 * 根据id获取员工信息
	 * @param employeeId
	 * @return
	 */
	public Employee getEmployee(Integer employeeId);
	
	/**
	 * 更新员工所在项目
	 * @param employee
	 * @return
	 */
	public boolean updateEmployeeProject(Employee employee);
}
